package ym.ecrm.web.action.systemManagement;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ModelDriven;

import ym.ecrm.core.common.util.Pager;
import ym.ecrm.core.domain.systemManagement.User;
import ym.ecrm.core.dto.systemManagement.UserQueryConditionDTO;
import ym.ecrm.core.service.systemManagement.ISystemService;
import ym.ecrm.web.action.base.BaseAction;

/**
 * 
 * @author Princess
 * 
 */
public class QueryUserWithConditionAction extends BaseAction implements ModelDriven<UserQueryConditionDTO>{

	private UserQueryConditionDTO queryConditionDTO = new UserQueryConditionDTO();
	private int page;
	private int limit;
	private Pager<User> pager;
	
	@Autowired
	private ISystemService systemService;

	public String execute() {
//	    pager = systemService.findUsers(queryConditionDTO,page,limit);
		return proccess();
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public Pager<User> getPager() {
		return pager;
	}

	public void setPager(Pager<User> pager) {
		this.pager = pager;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public String getSuccess() {
		return success;
	}

	@Override
	public UserQueryConditionDTO getModel() {
		return queryConditionDTO;
	}

}
